package edu.pku.sei.modeler.uml.actions;

import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;

import edu.pku.sei.modeler.model.structure.MetaNode;
import edu.pku.sei.modeler.model.structure.MetaShapeElement;


public class UMLElementDeleteFactory {
	
	public static final UMLElementDeleteFactory INSTANCE = new UMLElementDeleteFactory();
	
	private UMLElementDeleteFactory() {
		
	}
	
	public Command createCommand(MetaShapeElement element) {
		CompoundCommand command = new CompoundCommand();
		
		if (element instanceof MetaNode) {
			command.add(new DeleteUMLElementCommand(element));
			
		}
		
		
		return command;
	}

}
